﻿Namespace GestionCalculs
    ''' <summary>
    ''' Interface de base représentant une fonction de calcul.
    ''' </summary>
    ''' <remarks></remarks>
    Public Interface IFonctionCalcul
        Inherits System.ComponentModel.INotifyPropertyChanged

        ''' <summary>
        ''' Obtient l'etat des calculs
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        ReadOnly Property EtatCalcul() As ValueEtatCalcul

        ''' <summary>
        '''  Obtient le mode de recalcul
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Property ModeRecalcul() As TypeRecalcul

        ''' <summary>
        '''  Obtient la description
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Property Description() As String

        ''' <summary>
        '''  Obtient le temps de calcul
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        ReadOnly Property TempsCalcul() As System.TimeSpan

        ''' <summary>
        ''' Méthode implémentant la logique d'execution
        ''' </summary>
        ''' <remarks></remarks>
        Sub Calculer(Optional ByVal ForcerCalcul As Boolean = False)

        ''' <summary>
        ''' Méthode servant à réinitialiser la <see cref="IFonctionCalcul"  />
        ''' </summary>
        ''' <remarks></remarks>
        Sub Invalider()

        ''' <summary>
        ''' Méthode permettant de débloquer la fonction et ainsi de la rendre calculable
        ''' </summary>
        ''' <remarks></remarks>
        Sub EstCalculable()

        ''' <summary>
        ''' Méthode permettant de bloquer la fonction, empechant ainsi son exécution
        ''' </summary>
        ''' <remarks></remarks>
        Sub EstNonCalculable()

        Event EtatCalculChanged As EventHandler
        Event ModeRecalculChanged As EventHandler
        Event BeforeInvalider As EventHandler
        Event AfterInvalider As EventHandler
        Event AfterCalculer As EventHandler
    End Interface
End Namespace
